package za.um.td.input;

import za.um.td.input.keyboard.KeyboardRtsHandler;
import za.um.td.input.mouse.MouseRtsHandler;

import com.jme.input.InputHandler;
import com.jme.input.Mouse;
import com.jme.renderer.Camera;

public class RtsHandler extends InputHandler {
	private MouseRtsHandler mouseRtsHandler;
	private KeyboardRtsHandler keyboardRtsHandler;

	public KeyboardRtsHandler getKeyboardLookHandler() {
		return keyboardRtsHandler;
	}

	public MouseRtsHandler getMouseRtsHandler() {
		return mouseRtsHandler;
	}

	public RtsHandler(Mouse mouse, Camera camera) {
		mouseRtsHandler = new MouseRtsHandler(mouse, camera, 1f);
		addToAttachedHandlers(mouseRtsHandler);
		keyboardRtsHandler = new KeyboardRtsHandler(camera, 2.0f, 2f);
		addToAttachedHandlers(keyboardRtsHandler);
	}

	public RtsHandler(Mouse mouse, Camera camera, float moveSpeed, float turnSpeed) {
		mouseRtsHandler = new MouseRtsHandler(mouse, camera, moveSpeed);
		addToAttachedHandlers(mouseRtsHandler);
		keyboardRtsHandler = new KeyboardRtsHandler(camera, moveSpeed,
				turnSpeed);
		addToAttachedHandlers(keyboardRtsHandler);
	}
}
